package com.blockmeta.bbs.businesslibrary.widget.chartview.Tools;

import android.graphics.RectF;

public class ChartConverter 
{
	public static RectF ConvertToRect(RectF pRect, RectF pPanelRect, RectF pSpace)
	{
		float tPanelWidth = pPanelRect.width();
		float tPanelHeight = pPanelRect.height();
		float tLeft = tPanelWidth * pRect.left + pSpace.left;
		float tTop = tPanelHeight * pRect.top + pSpace.top;
		float tRight = tPanelWidth * pRect.right + tLeft;
		float tBottom = tPanelHeight * pRect.bottom + tTop;
		RectF tPanelRect = new RectF(tLeft, tTop, tRight, tBottom);
		return tPanelRect;
	}
}
